State

enum State : ProtocolMessageEnum
Any significant power changing event in meshtastic should be tagged with a powermon state transition.
If you are making new meshtastic features feel free to add new entries at the end of this definition.
Protobuf enum meshtastic.PowerMon.State

Entries

Link copied to clipboard

None = 0;

Link copied to clipboard

CPU_DeepSleep = 1;

Link copied to clipboard

CPU_LightSleep = 2;

Link copied to clipboard
Link copied to clipboard

Lora_RXOn = 8;

Link copied to clipboard

Lora_TXOn = 16;

Link copied to clipboard

Lora_RXActive = 32;

Link copied to clipboard

BT_On = 64;

Link copied to clipboard

LED_On = 128;

Link copied to clipboard

Screen_On = 256;

Link copied to clipboard

Screen_Drawing = 512;

Link copied to clipboard

Wifi_On = 1024;

Link copied to clipboard
Link copied to clipboard

Properties

Link copied to clipboard
val BT_On_VALUE: Int = 64
BT_On = 64;
Link copied to clipboard
CPU_DeepSleep = 1;
Link copied to clipboard
CPU_LightSleep = 2;
Link copied to clipboard
val GPS_Active_VALUE: Int = 2048

GPS is actively trying to find our location
See GPSPowerState for more details
GPS_Active = 2048;
Link copied to clipboard
val LED_On_VALUE: Int = 128
LED_On = 128;
Link copied to clipboard
Lora_RXActive = 32;
Link copied to clipboard
Lora_RXOn = 8;
Link copied to clipboard
Lora_TXOn = 16;
Link copied to clipboard
val None_VALUE: Int = 0
None = 0;
Link copied to clipboard
Screen_Drawing = 512;
Link copied to clipboard
val Screen_On_VALUE: Int = 256
Screen_On = 256;
Link copied to clipboard

The external Vext1 power is on.  Many boards have auxillary power rails that the CPU turns on only
occasionally.  In cases where that rail has multiple devices on it we usually want to have logging on
the state of that rail as an independent record.
For instance on the Heltec Tracker 1.1 board, this rail is the power source for the GPS and screen.

The log messages will be short and complete (see PowerMon.Event in the protobufs for details).
something like "S:PM:C,0x00001234,REASON" where the hex number is the bitmask of all current states.
(We use a bitmask for states so that if a log message gets lost it won't be fatal)
Vext1_On = 4;
Link copied to clipboard
val Wifi_On_VALUE: Int = 1024
Wifi_On = 1024;

Functions

Link copied to clipboard
Link copied to clipboard
open fun getDescriptor(): Descriptors.EnumDescriptor
Link copied to clipboard
fun getDescriptorForType(): Descriptors.EnumDescriptor
Link copied to clipboard
fun getNumber(): Int
Link copied to clipboard
fun getValueDescriptor(): Descriptors.EnumValueDescriptor
Link copied to clipboard
open fun internalGetValueMap(): Internal.EnumLiteMap<PowerMonProtos.PowerMon.State>
Link copied to clipboard
open fun valueOf(desc: Descriptors.EnumValueDescriptor): PowerMonProtos.PowerMon.State

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants.